Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: use nixosOptionDocs #177

Merged
merged 7 commits into from
Nov 6, 2023
Merged

docs: use nixosOptionDocs #177

merged 7 commits into from
Nov 6, 2023

Conversation

NotAShelf
Copy link
Owner

NixOS 23.11 is deprecating DocBook option documentation. Following home-manager in this change is probably a good idea. This change drops literalDocBook and the provided nmd functions in favor of nixosOptionDocs and CommonMark in option descriptions.

NixOS 23.11 is deprecating DocBook option documentation. Following home-manager in this change is probably a good idea
@NotAShelf NotAShelf added documentation Improvements or additions to documentation enhancement New feature or request labels Nov 4, 2023
@NotAShelf NotAShelf added this to the 0.5 milestone Nov 4, 2023
@NotAShelf NotAShelf self-assigned this Nov 4, 2023
@NotAShelf
Copy link
Owner Author

@horriblename building options.json currently fails with option vim.extraPlugins.<name>.package has no description, any chance you could look at this?

@horriblename
Copy link
Collaborator

oops missing description

diff --git a/lib/types/plugins.nix b/lib/types/plugins.nix
index 344c405..ee33a42 100644
--- a/lib/types/plugins.nix
+++ b/lib/types/plugins.nix
@@ -112,6 +112,7 @@ with lib; let
       options = {
         package = mkOption {
           type = pluginType;
+          description = "Plugin Package.";
         };
         after = mkOption {
           type = listOf str;

build still not passing tho, this time failing on

       > /nix/store/q53bq2b1dw0wa75znak2sxi1p5rxkl5g-manual-combined/manual-combined.xml:7
45: element appendix: Relax-NG validity error : Element appendix failed to validate conten
t
       >    741   </section>
       >    742      </chapter>
       >    743       <appendix xml:id="ch-options">
       >    744   <title>Configuration Options</title>
       >    745    <appendix xmlns="http://docbook.org/ns/docbook" xml:id="appendix-config
uration-options" xml:base="nmd-result/neovim-flake-options.xml">
       >    746         <title>Configuration Options</title>
       >    747  <variablelist xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:nixos="tag
:nixos.org" xmlns="http://docbook.org/ns/docbook" xml:id="neovim-flake-options">
       >
       > /nix/store/q53bq2b1dw0wa75znak2sxi1p5rxkl5g-manual-combined/manual-combined.xml f
ails to validate

do you know what's going on?

@NotAShelf
Copy link
Owner Author

I might have an idea, I'll see if that helps

@NotAShelf
Copy link
Owner Author

neat, that did the trick

@horriblename
Copy link
Collaborator

{option} don't provide links in the html docs.

i.e.

If vim.lsp.lspkind.enable is true, then the function will be called before modifications from lspkind.

instead of

If vim.lsp.lspkind.enable is true, then the function will be called before modifications from lspkind.

@NotAShelf
Copy link
Owner Author

that is interesting, we're basically following home-manager in regards of nmd usage - but features that it's able to use don't apply to us, which seems to be all CommonMark features?

@NotAShelf
Copy link
Owner Author

after little research, I've noticed that {option} intentionally does not link the relevant issue. Home-manager seems to be using [](#opt-home...) for linked options.

@NotAShelf
Copy link
Owner Author

Okay, I believe 9328443 remedies the issue you've mentioned. The only remaining issue is the codeblock not being converted correctly in autocomplete.formatting.format

image

@NotAShelf
Copy link
Owner Author

Might be because it's an example?

@horriblename
Copy link
Collaborator

lib.literalMD seems to work

horriblename
horriblename previously approved these changes Nov 6, 2023
Copy link
Collaborator

@horriblename horriblename left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@NotAShelf NotAShelf merged commit 7bcfea2 into main Nov 6, 2023
7 checks passed
@NotAShelf NotAShelf deleted the nixos-option-docs branch November 6, 2023 08:27
bloxx12 pushed a commit to bloxx12/nvf that referenced this pull request Sep 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
Development

Successfully merging this pull request may close these issues.

2 participants